from datetime import datetime

if __name__ == '__main__':
    now = datetime.now()
    print now
    print type(now)
    print now.year, now.month, now.date(),now.day,now.hour,now.second
    print "---------------------------------------------------------"
    datetime_ = datetime(2017, 3, 4, 17) - datetime(2017, 2, 18, 15)
    print datetime_
    print type(datetime_)
    print datetime_.days, datetime_.seconds
